﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Avivo.Models
{
	[DataContract(Name = "sysinfo", Namespace = "")]
	public class DeviceInfo
	{
		/// <summary>
		/// Gets or sets device id.
		/// </summary>
		[DataMember(Name = "deviceId", IsRequired = false, EmitDefaultValue = false)]
		public string DeviceId
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets device name.
		/// </summary>
		[DataMember(Name = "deviceName", IsRequired = false, EmitDefaultValue = false)]
		public string DeviceName
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets device platform.
		/// </summary>
		[DataMember(Name = "devicePlatform", IsRequired = false, EmitDefaultValue = false)]
		public string DevicePlatform
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets free physical space in bytes.
		/// </summary>
		[DataMember(Name = "availPhys", IsRequired = false, EmitDefaultValue = false)]
		public int AvailablePhysicalSpace
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets total physical space in bytes.
		/// </summary>
		[DataMember(Name = "totalPhys", IsRequired = false, EmitDefaultValue = false)]
		public int TotalPhysicalSpace
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets battery life in percent. Values 0.0 to 1.0.
		/// </summary>
		[DataMember(Name = "batteryLifePercent", IsRequired = false, EmitDefaultValue = false)]
		public double BatteryLifePercent
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets battery lifetime in seconds.
		/// </summary>
		[DataMember(Name = "batteryLifetime", IsRequired = false, EmitDefaultValue = false)]
		public int? BatteryLifetime
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets current time value on the device.
		/// </summary>
		[DataMember(Name = "currentTime", IsRequired = false, EmitDefaultValue = false)]
		public DateTime CurrentTime
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets major, minor and build number.
		/// </summary>
		[DataMember(Name = "version", IsRequired = false, EmitDefaultValue = false)]
		public string Version
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets status whether device is plugged in.
		/// </summary>
		[DataMember(Name = "acLineStatus", IsRequired = false, EmitDefaultValue = false)]
		public int ACLineStatus
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets a list of installed applications.
		/// </summary>
		[DataMember(Name = "apps", IsRequired = false, EmitDefaultValue = false)]
		public List<DeviceInfoApplication> AppList
		{
			get;
			set;
		}
	}
}
